home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / cuj0593.zip / 1105034B < prev    next >
Text File  |  1993-03-04  |  459b  |  30 lines

  1. //    Copyright (C) 1992 by Nicholas Wilt.  All rights reserved.
  2.  
  3. #include <iostream.h>
  4. #include <stdlib.h>
  5. #include "insort.h"
  6.  
  7. #define NUMINTS 10
  8.  
  9. int
  10. main()
  11. {
  12.     int i;
  13.     int x[NUMINTS];
  14.  
  15.     randomize();
  16.     for (i = 0; i < NUMINTS; i++) {
  17.     x[i] = rand();
  18.     cout << x[i] << ' ';
  19.     }
  20.     cout << '\n';
  21.     InsertionSort(x, NUMINTS);
  22.     for (i = 0; i < NUMINTS; i++)
  23.     cout << x[i] << ' ';
  24.     cout << '\n';
  25.  
  26.     return 0;
  27. }
  28.  
  29.  
  30.